<template>
  <div id="app">
    <header>title</header>
    <div class="content-box">
      <router-link to="/content">content</router-link>|
      <router-link to='/test'>test</router-link>
      <router-link to='/'>返回</router-link>
      <transition name="fade" mode="out-in">
        <router-view class="firstClass"></router-view>
      </transition>
    </div>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
div{
  box-sizing: border-box;
}
header{
    position:fixed;
    top:0;
    left:0;
    height:2.4rem;
    width:16rem;
    line-height:2.4rem;
    background:#005BAC;
    color:white;
    font-family: "Microsoft YaHei"
}
.content-box{
  width:100%;
  height:100%;
  overflow: scroll;
  padding-top:3rem;
}
.firstClass{
  border:1px solid red;
}
.fade-enter {
  opacity:0;
}
.fade-leave{
  opacity:1;
}
.fade-enter-active{
  transition:opacity .5s;
}
.fade-leave-active{
  /* opacity:0; */
  transition:opacity .5s;
}
.fade-enter{
  opacity: 0;
}
.fade-leave{
  opacity: 1;
}
/* .fade-enter-active{
  transition:opacity .5s;
  opacity: 1;
}
.fade-leave-active{
  transition:opacity .5s;
  opacity:0;
} */
</style>
